{% macro gen_table(enterprise_media_reports) %}
    <table id="cancel-attention-user-info-table"
           class="table table-bordered table-hover table-condensed table-striped">
        <thead>
            <tr>
                <th>排序</th>
                <th>报道标题</th>
                <th>报道内容</th>
                <th>媒体报道</th>
            </tr>
        </thead>
        {% for each in enterprise_media_reports %}
        <tbody>
            <tr>
                <td>{{ each.weight }}</td>
                <td>{{ each.report_title }}</td>
                <td>{{ each.report_text }}</td>
                <td>
                    <img src="{{ each.report_img_url }}" width="100px" height="100px">
                </td>
               <td>
                         <a
                        class="btn btn-xs btn-primary"
                        href="{{ url_for('enterprise_bp.enterprise_item_edit', item_key='media_report', item_id=each.id) }}"
                        target="_self"
                    >编辑</a><br>
                   <a
                           class="btn btn-xs btn-danger" style="margin: 3px;"
                           href="{{ url_for('enterprise_bp.enterprise_item_delete', item_key='media_report', item_id=each.id) }}"
                           target="_self"
                           onclick="return confirm('确定要删除此产品吗?')"
                   >删除</a><br>
                </td>
            </tr>
        </tbody>
        {% endfor %}
    </table>
{% endmacro %}
